package com.example.demo.sqlprovider;

public class QuerySqlProvider {

    public String queryResult(String startDate, String endDate){
        StringBuilder sqlBuilder = new StringBuilder();
        sqlBuilder.append("select nickName,date,cast((sum(NET))/100 as decimal(18,2)) net from V_TRADE_TRADER ")
    //            .append("where [DATE]>= '").append(startDate).append("'and [DATE]<= '")
                .append("where date(date) between '").append(startDate).append("' and '")
                .append(endDate).append("' group by NickName,date order by NickName,date;");

        return sqlBuilder.toString();
    }
}
